package net.labdemo.entity;


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import net.labdemo.common.entity.BaseEntity;
/**
 * 文章
 * @author xiaofanku
 * 20160609
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Article extends BaseEntity<Article> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 文章标题
	 */
	private String title;
	/**
	 * 简述
	 */
	private String description;
	/**
	 * 文章内容
	 */
	private String content;
	/**
	 * 阅读数
	 */
	private int readnum;
	/**
	 * 发布日期
	 */
	private Date pubdate;
	/**
	 * 作者
	 */
	private User author;
	/**
	 * 参考文档
	 */
	private Set<Refer> referes;
	/**
	 * 哪些人可以看
	 */
	private Set<Role> roles=new HashSet<>();
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Date getPubdate() {
		return pubdate;
	}
	public void setPubdate(Date pubdate) {
		this.pubdate = pubdate;
	}
	public User getAuthor() {
		return author;
	}
	public void setAuthor(User author) {
		this.author = author;
	}
	public Set<Refer> getReferes() {
		return referes;
	}
	public void setReferes(Set<Refer> referes) {
		this.referes = referes;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getReadnum() {
		return readnum;
	}
	public void setReadnum(int readnum) {
		this.readnum = readnum;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Set<Role> getRoles() {
		return roles;
	}
	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}
}
